<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>编辑店铺 - 红高粱</title>
<%@ include file="/WEB-INF/jsp/common/res.jsp"%>
<link href="<c:url value="/scripts/jquery/validate/css/validate.css"/>" rel="stylesheet"/>
<script src="<c:url value="/scripts/jquery/validate/jquery.validate.min.js"/>"></script> 
<script charset="utf-8" src="<c:url value="/widgets/kindeditor/kindeditor.js"/>"></script>
<script charset="utf-8" src="<c:url value="/widgets/kindeditor/lang/zh_CN.js"/>"></script>
<script type="text/javascript" src="<c:url value="/scripts/category/editCategory.js"/>"></script>
<style type="text/css">
#_category{background-color: #0087d8;} 
.text{width:300px;height:20px;color:#666666;}
.menu{text-align:center;padding:4px;padding-right:5px;width: 300px;}
#img{cursor: pointer;}
</style>
</head>
<body>
	<%@ include file="/WEB-INF/jsp/common/header.jsp"%>
	<div class="main_title">
		<div class="main_title2"><span>当前位置：店铺管理 &gt; 编辑店铺</span></div>
	</div>
	<div class="main_content">
			<div class="main_menu">
				<ul>
					<li>
						<a href="<c:url value="/categorym/query"/>" style="color:#FFFFFF;">店铺信息</a>
					</li>
					<li><a href="<c:url value="/categorym/add"/>">添加店铺</a></li>
					<li class="choice"><a href="<c:url value="#"/>">修改店铺</a></li>
				</ul>
			</div>
			<div class="main_list">
				<div style="margin:30px 50px">
					<form action="<c:url value="/categorym/edit"/>" method="post" id="editCategoryForm">
						<p>
							<label>店名<span class="red">*</span></label>
							<input type="text" name="name" class="text" value="${p.name}" />
						</p>
						<p>
							<label>封面图片<span class="red">*</span></label>
							<input type="hidden" name="images" id="images" value="${p.images}"/>
							<c:if test="${p.images eq ''}">
								<img src="" style="width:150px;height:auto;display:none;" />
								<input type="button" id="image_upload" style="height:25px;padding-top:2px;" class="btn" value="上传" />
							</c:if>
							<br />
							<c:if test="${p.images != ''}">
								<img src="${p.images}" id="img_display" style="width:150px;height:auto;" />
								<input type="button" id="image_update" style="height:25px;padding-top:2px;" class="btn" value="修改" />
							</c:if>
							(图片大小不能超过1M)
						</p>
						<p>
							<label>地址<span class="red">*</span></label>
							<input type="text" name="address" class="text"  value="${p.address}" />
						</p>
						<p>
							<label>电话<span class="red">*</span></label>
							<input type="text" name="phone" class="text"  value="${p.phone}" />
						</p>
						<p>
							<label>登陆ID<span class="red">*</span></label>
							<input type="text" name="loginId" class="text"  value="${p.loginId}" readOnly="true"/>
						</p>
						<p>
							<label>用户名<span class="red">*</span></label>
							<input type="text" name="uname" class="text"  value="${p.uname}" />
						</p>
						<p>
							<input type="hidden" name="customerId" id="customerId" value="${customerId }"/>
							<input type="hidden" name="return" value="${returnUrl}"/>
							<input type="hidden" name="id" value="${p.id}"/>
							<input type="submit" value="保存" class="btn" />
							<input type="reset" value="重置" class="btn" />
						</p>
					</form>
				</div>
			</div>
	</div>
</body>
</html>